import os

common_env = Environment()

include_paths = ['../include', '../lib', 'unit', '/usr/include/qt4']
lib_paths = [ '../lib/libff' ]

common_env.Append( CPPPATH = [ os.path.abspath(p) for p in include_paths ] )
common_env.Append( CCFLAGS = ['-g','-Wall', '-DDEBUG' ] )
#common_env.Append( CCFLAGS = ['-O3','-Wall','-DNDEBUG'] )
common_env.Append( LIBS=[ 'cppunit', 'dl', 'ff' ])
common_env.Append( LIBPATH=[ os.path.abspath(p) for p in lib_paths ] )


Export('common_env')
src_objs = SConscript( '../src/SConscript', 'common_env' )
if src_objs is None : print "src_objs is None"
test_running = [ common_env.Object('test_runner.cxx')]
if test_running is None : print "test_running is None"
test_objs = []
for subdir in ['unit'] :
	test_objs += SConscript( '%s/SConscript'%subdir )

common_env.Program( 'all-tests', src_objs + test_running + test_objs )
